use strict;
use warnings;

package JasPerl::PageContext::ScopeHash;
use parent 'JasPerl::PageContext::HashSupport';

sub new {
    my ($class, $context, $scope) = @_;
    bless { context => $context, scope => $scope }, $class;
}

sub get {
    return $_[0]->{context}->get_attribute($_[1], $_[0]->{scope});
}

sub put {
    return $_[0]->{context}->set_attribute($_[1], $_[0]->{scope});
}

sub remove {
    return $_[0]->{context}->remove_attribute($_[1], $_[0]->{scope});
}

sub keys {
    return $_[0]->{context}->get_attribute_names_in_scope($_[0]->{scope});
}

1;
